import request from '@/utils/request'
import { baseUrl } from '@/config/env';

//获取分类列表
export const getList = (page,limit,categoryId,secondCategoryId,status) => {
  return request({
    url: baseUrl+'/rest/serviceWork/list',
    method: 'get',
    params: {
      page,
      limit,
      categoryId,
      secondCategoryId,
      status
    }
  })
}



//新增编辑
export const edit = (row) => {
  return request({
    url: baseUrl+'/rest/serviceWork/edit',
    method: 'post',
    headers:{'content-type':'application/json;charset=UTF-8'},
    data: row
  })
}


//删除标签
export const del = (id) => {
  return request({
    url: `${baseUrl}/rest/serviceWork/delete/${id}`,
    method: 'get',
  })
}

//获取详情
export const detail = (id) => {
  return request({
    url: `${baseUrl}/rest/serviceWork/detail/${id}`,
    method: 'get',
  })
}

//众包服务刷新
export const postRefresh = (id) => {
  return request({
    url:`${baseUrl}/rest/serviceWork/refresh/${id}`,
    method:'get'
  })
}

//众包服务置顶
export const top = (id) => {
  return request({
    url:`${baseUrl}/rest/serviceWork/top/${id}`,
    method:'get'
  })
}
